﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/FarmMaster.master" AutoEventWireup="true" CodeFile="ListFront.aspx.cs" Inherits="Web_ListFront" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
   <script language="javascript" type="text/javascript">
       //说明 所有的元素以ul li ul li ul li的循环格式嵌套 如果没有下级分类 就用li a结束嵌套
       $(document).ready(function () {
           //$(".navvan ul li").children("ul").hide();
           $(".navvan").find("li").not(":has(ul)").children("a").css({ textDecoration: "none", color: "#333", background: "none" }).click(function () {

           });
           $(".navvan").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).click(function () {
               if ($(this).next("ul").is(":hidden")) {
                   $(this).next("ul").slideDown("slow");
                   if ($(this).parent("li").siblings("li").children("ul").is(":visible")) {
                       $(this).parent("li").siblings("li").find("ul").slideUp("1000");
                       $(this).parent("li").siblings("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" }).end().find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                   }
                   $(this).css({ background: "url(images/statu_open.gif) no-repeat left top;" });
                   return false;
               } else {
                   $(this).next("ul").slideUp("normal");
                   //不用toggle()的原因是为了在收缩菜单的时候同时也将该菜单的下级菜单以后的所有元素都隐藏
                   $(this).css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                   $(this).next("ul").children("li").find("ul").fadeOut("normal");
                   $(this).next("ul").find("li:has(ul)").children("a").css({ background: "url(images/statu_close.gif) no-repeat left top;" });
                   return false;
               }

           });
       });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="main">
		<div class="left">
			<div class="navvan">
	            <div class="part">培训阵地</div>
	            <ul class="outside">
                    <%
                        string[] ps = {"分校","教学点","培训基地","实训基地" };
                        foreach (string p in ps)
                        {
                            Topic topic = Toolkit.GetTopicByName("分校");
                            string topicId = topic == null ? "" : topic.ID;
                    %>
                        <li class="first">
                            <a href="#"><%=p %></a>
                            <%
                            
                            %>
                            <ul class="child">
                                <li><a href='./ListFront.aspx?topic_id=<%=topicId %>&district=东营区'>东营区</a></li>
                                <li><a href='./ListFront.aspx?topic_id=<%=topicId %>&district=河口区'>河口区</a></li>
                                <li><a href='./ListFront.aspx?topic_id=<%=topicId %>&district=广饶县'>广饶县</a></li>
                                <li><a href='./ListFront.aspx?topic_id=<%=topicId %>&district=垦利县'>垦利县</a></li>
                                <li><a href='./ListFront.aspx?topic_id=<%=topicId %>&district=利津县'>利津县</a></li>
                            </ul>
                        </li>                        
                    <%
                        }
                    %>
                </ul>
            </div>
			
			<div class="left2">
				<div class="tle">
					<span class="text1">最新动态</span>
				</div>
				<div class="tents">
					<ul style=" padding-top:5px;">
						<asp:Repeater ID="Repeater3" runat="server">
                            <ItemTemplate>
                                <li><a href='<%=Toolkit.ApplicationRoot %>/Html/<%#Eval("url") %>'><%#Eval("Title").ToString().Length>12?Eval("Title").ToString().Substring(0,11)+"...":Eval("Title") %></a></li>
                            </ItemTemplate>
                        </asp:Repeater>
					</ul>
				</div>
			</div>
		</div>
		<div class="right">
			<div class="headline">
				您的当前位置：<%=path %>
			</div>
			<div class="content" style=" border:none;">
                <asp:Repeater ID="Repeater1" runat="server">
                    <ItemTemplate>
                        <ul style="padding-top:10px;">
					        <li class="detail"><span style="width:10px; height:20px; display:block; float:left;">▪</span><a href='<%=Toolkit.ApplicationRoot %>/Html/<%#Eval("url") %>'><%#Eval("Title").ToString().Length>40?Eval("Title").ToString().Substring(0,38)+"...":Eval("Title") %></a></li>
					        <li class="date"><%#string.Format("{0:yyyy-MM-dd}",Eval("published")) %></li>
				        </ul>
                    </ItemTemplate>
                </asp:Repeater>
			</div>
            <div class="cup">
	            <ul>
		            <li class="cup1">
                        <asp:ImageButton ID="FirstButton" runat="server" 
                            SkinID="FirstButton" onclick="ChangePage" /></li>
		            <li class="cup2">
                        <asp:ImageButton ID="PreviousButton" runat="server" 
                            SkinID="PreviousButton" onclick="ChangePage" /></li>
		            <li class="cup5">第<%=pds.PageCount==0?0: pds.CurrentPageIndex+1 %>页/共<%=pds.PageCount %>页</li>
		            <li class="cup3">
                        <asp:ImageButton ID="NextButton" runat="server" 
                            SkinID="NextButton" onclick="ChangePage" /></li>
		            <li class="cup4">
                        <asp:ImageButton ID="LastButton" runat="server" 
                            SkinID="LastButton" onclick="ChangePage" /></li>
	            </ul>
            </div>
		</div>
	</div>
</asp:Content>

